package com.rick.test;

import cn.hutool.http.HttpRequest;
import cn.hutool.json.JSONUtil;

import java.util.concurrent.TimeUnit;

public class Btest {

    public static void main(String[] args) throws InterruptedException {
        String url = "http://10.101.108.141:32217/notification-web-api/api/v2/push/pushData";
        String url2 = "http://10.101.108.141:32217/notification-web-api/api/v2/push/pushMsg";

        String json ="{\n" +
                "    \"dId\": \"1628425\",\n" +
                "    \"openId\": \"e0b596a71d7749b5a9bb6cff5384ddcf\",\n" +
                "    \"data\": \"hello A18y,please reply yes\"\n" +
                "}";
        for (int i = 0; i < 100; i++) {
            String body = HttpRequest.post(url)
                    .body(JSONUtil.toJsonStr(json))
                    .execute().body();
            System.out.println("body = " + body);
            TimeUnit.SECONDS.sleep(5);

        }

    }
}


